package com.atguigu.gmall.product.controller;

import com.atguigu.gmall.common.result.Result;
import com.atguigu.gmall.model.product.BaseSaleAttr;
import com.atguigu.gmall.product.service.BaseSaleAttrService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 钟涛
 * @version 1.0
 * @description: TODO
 * @date 2021/12/8 14:54
 */
@RequestMapping("/admin/product")
@RestController
public class BaseSaleAttrController {
    @Autowired
    private BaseSaleAttrService baseSaleAttrService;
    /**
     * 获取销售属性列表
     */
    @RequestMapping("/baseSaleAttrList")
    public Result getSaleAttrList() {
        List<BaseSaleAttr> list = baseSaleAttrService.list();
        return Result.ok(list);
    }


}
